package com.itheima.mall.service.ums;

import com.itheima.mall.api.ums.UmsResourceServiceApi;
import com.itheima.mall.pojo.ums.UmsResource;
import com.itheima.mall.vo.R;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

@Service
public class UmsResourceService {

    @DubboReference
    UmsResourceServiceApi umsResourceServiceApi;

    public R UmsResourceCreate(UmsResource umsResource) {
        return umsResourceServiceApi.UmsResourceCreate(umsResource);
    }

    public R UmsResourceDelete(Long id) {
        return umsResourceServiceApi.UmsResourceDelete(id);
    }

    public R UmsResourceList(Long categoryId, String nameKeyword, Integer pageNum, Integer pageSize, String urlKeyword) {
        return umsResourceServiceApi.UmsResourceList(categoryId,nameKeyword,pageNum,pageSize,urlKeyword);
    }

    public R UmsResourceListAll() {
        return umsResourceServiceApi.UmsResourceListAll();
    }

    public R UmsResourceUpdate(Long id, UmsResource umsResource) {
        return umsResourceServiceApi.UmsResourceUpdate(id,umsResource);
    }

    public R UmsResourceFindById(Long id) {
        return umsResourceServiceApi.UmsResourceFindById(id);
    }
}
